home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / discgrpP.h < prev    next >
C/C++ Source or Header  |  1993-02-15  |  3KB  |  97 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #ifndef DISCGRPPDEF
  13. #define DISCGRPPDEF
  14.  
  15. #include "geomclass.h"
  16. #include "discgrp.h"
  17. #include "3d.h"
  18. #include "wa.h"
  19. #include "winged_edge.h"
  20.  
  21. /* attributes */
  22. #define DG_KEYWORDSIZE     32
  23. #define DG_NAMESIZE     128
  24. #define DG_LABELSIZE    256
  25. #define    DG_WORDLENGTH    32
  26. #define DG_MAXGENS    128        /* MAXGENS appears in fsa.h */
  27.  
  28.  
  29. struct DiscGrpEl {
  30.     int         attributes;    /* type? fixed points, etc? */
  31.     char         word[DG_WORDLENGTH]; /* the 'string' in the generators? */
  32.     Transform     tform;
  33.     ColorA        color;    
  34.     struct DiscGrpEl    *inverse;
  35.     };
  36.  
  37. typedef struct DiscGrpEl DiscGrpEl;
  38.  
  39. typedef struct keytokenpair {
  40.     char key[32];
  41.     int token;
  42.     }  keytokenpair;
  43.  
  44. typedef struct {
  45.     int attributes;        /* special, orthogonal, projective, etc */
  46.                 /* plus entry type ... */
  47.     int dimn;        /* dimension of matrix */
  48.     int sig;        /* signature of group */
  49.     } matrixgroup;
  50.  
  51. typedef struct {
  52.     int        num_el;
  53.     matrixgroup    mgroup;
  54.     DiscGrpEl     *el_list;
  55.     } DiscGrpElList;
  56.         
  57. struct DiscGrp {
  58.     GEOMFIELDS
  59.     char         *name;
  60.     char         *comment;
  61.     int         flag;        /* graphics flags */
  62.     int         attributes;    /* group attributes */
  63.     int         dimn;
  64.     float        (*c2m)[4];    /* record the transform taking cam->model*/
  65.     wa        *fsa;        /* word acceptor */
  66.     DiscGrpElList    *gens;        /* generators */
  67.     DiscGrpElList    *nhbr_list;    /* dirdom neighbors */
  68.     DiscGrpElList    *big_list;    /* some arbitrary list of group el's */
  69.     HPoint3        cpoint;        /* center point for dirichlet domain */
  70.     Geom        *camgeom;    /* camera geom: moves w/ camera */
  71.     Handle        *camgeomhandle;
  72.     Geom        *ddgeom;    /* special geom*/
  73.     Handle        *ddgeomhandle;
  74.     Geom        *geom;        /* geometry for one fund domain */
  75.     Handle        *geomhandle;
  76.     float        scale;        /* shrink dirdom before drawing... */
  77.     int        enumdepth;    /* max word length for big_list */
  78.     float         enumdist;    /* max distance grp el moves cpoint */
  79.     } ;
  80.  
  81. extern HPoint3 DGorigin;
  82.  
  83. extern GeomClass *DiscGrpClass;
  84.  
  85. /* private methods */
  86. extern void DiscGrpSetupDirdom( DiscGrp *discgrp);
  87. extern DiscGrpEl *DiscGrpClosestGroupEl( DiscGrp *discgrp, HPoint3 *poi);
  88. extern DiscGrpElList *DiscGrpExtractNhbrs( WEpolyhedron *wepoly );
  89. extern Geom *DiscGrpDirDom( DiscGrp *dg);
  90. extern Geom *WEPolyhedronToBeams( WEpolyhedron *poly, float alpha);
  91. extern WEpolyhedron *DiscGrpMakeDirdom( DiscGrp *dg, HPoint3 *pt0, int slice);
  92. extern DiscGrpElList *DiscGrpEnum( DiscGrp *dg, int (*constraintfn)());
  93. extern void DiscGrpInitStandardConstraint( int depth, float d0, float d1);
  94. extern int DiscGrpStandardConstraint( DiscGrpEl *dgel);
  95.         
  96. #endif /* ! DISCGRPPDEF */
  97.